package servlet;

import com.ly.common.util.DBHelper;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class SsqBiz {
    public void save(String filepath) throws IOException {
        try(FileReader fr = new FileReader(filepath);
        BufferedReader br = new BufferedReader(fr);
        ){
            String line;
            while((line= br.readLine())!=null) {
                String[] items = line.split("\\s+");
                String sql = "insert into ssq_lottery values (" +
                        "default, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
                DBHelper.update(sql, items);
                
            }

        }
    }
}
